#include "StudyQWebEngineUrlScheme.h"
#include <QtWidgets/QApplication>

int main(int argc, char *argv[])
{
    {
        QWebEngineUrlScheme scheme("amurl");
        scheme.setSyntax(QWebEngineUrlScheme::Syntax::Path);
        scheme.setFlags(QWebEngineUrlScheme::SecureScheme | QWebEngineUrlScheme::CorsEnabled);
        QWebEngineUrlScheme::registerScheme(scheme);
    }


    QApplication a(argc, argv);

    {
        AMUrlSchemeHandler* handler = new AMUrlSchemeHandler(&a);
        QWebEngineProfile::defaultProfile()->installUrlSchemeHandler("amurl", handler);
    }

    StudyQWebEngineUrlScheme w;
    w.show();
    return a.exec();
}
